package com.iqik.redis.conf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class RedisClusterConfigProperties {
    @Value("${spring.redis.cluster.nodes}")
    private List<String> nodes;
    @Value("${spring.redis.jedis.max-active}")
    private Integer maxAttempts;
    @Value("${spring.redis.jedis.timeout}")
    private Integer connectionTimeout;
    @Value("${spring.redis.jedis.max-wait}")
    private Integer soTimeout;

    public List<String> getNodes() {
        return nodes;
    }

    public void setNodes(List<String> nodes) {
        this.nodes = nodes;
    }

    public Integer getMaxAttempts() {
        return maxAttempts;
    }

    public void setMaxAttempts(Integer maxAttempts) {
        this.maxAttempts = maxAttempts;
    }

    public Integer getConnectionTimeout() {
        return connectionTimeout;
    }

    public void setConnectionTimeout(Integer connectionTimeout) {
        this.connectionTimeout = connectionTimeout;
    }

    public Integer getSoTimeout() {
        return soTimeout;
    }

    public void setSoTimeout(Integer soTimeout) {
        this.soTimeout = soTimeout;
    }
}
